import request from "@/utils/request";

// 查询提现列表
export function listCashOut(query) {
  return request({
    url: "/system/cashOut/list",
    method: "get",
    params: query
  });
}

// 查询提现详细
export function getCashOut(id) {
  return request({
    url: "/system/cashOut/" + id,
    method: "get"
  });
}

// 新增提现
export function addCashOut(data) {
  return request({
    url: "/system/cashOut",
    method: "post",
    data: data
  });
}

// 修改提现
export function updateCashOut(data) {
  return request({
    url: "/system/cashOut",
    method: "put",
    data: data
  });
}

// 删除提现
export function delCashOut(id) {
  return request({
    url: "/system/cashOut/" + id,
    method: "delete"
  });
}

// 导出提现
export function exportCashOut(query) {
  return request({
    url: "/system/cashOut/export",
    method: "get",
    params: query
  });
}

export function getCashOutThreshold() {
  return request({
    url: "/system/cashoutThreshold/getInfo",
    method: "get"
  });
}

export function updateCashOutThreshold(data) {
  return request({
    url: "/system/cashoutThreshold/save",
    method: "post",
    data
  });
}
